//蔚来面试题；
//注意 tolower 的使用；
#include <iostream>
#include <string>
#include <set>
using namespace std;

class Solution{
public:
int WordSize(std::string& str){
    std:set<std::string> sets;
    std::string res;
    for(int i=0;i<str.size();++i){
        if(!isalnum(str[i])){
            if(!res.empty()){
                if(!sets.count(res)){
                    sets.insert(res);
                }
                res.clear();
            }
        }else{
            res=res+static_cast<char>(std::tolower(str[i]));
        }
    }
    if(!res.empty()){
        if(!sets.count(res)){
            sets.insert(res);
        }
    }
    for(auto item:sets) {
            std::cout << item << "        " ;
    }
    std::cout << endl ;
    return sets.size();
    }
};